package org.apache.jsp.bootstrap;

import javax.servlet.*;
import javax.servlet.http.*;
import javax.servlet.jsp.*;
import org.apache.jackrabbit.util.Text;

public final class missing_jsp extends org.apache.jasper.runtime.HttpJspBase
    implements org.apache.jasper.runtime.JspSourceDependent {

  private static final JspFactory _jspxFactory = JspFactory.getDefaultFactory();

  private static java.util.List _jspx_dependants;

  private javax.el.ExpressionFactory _el_expressionfactory;
  private org.apache.AnnotationProcessor _jsp_annotationprocessor;

  public Object getDependants() {
    return _jspx_dependants;
  }

  public void _jspInit() {
    _el_expressionfactory = _jspxFactory.getJspApplicationContext(getServletConfig().getServletContext()).getExpressionFactory();
    _jsp_annotationprocessor = (org.apache.AnnotationProcessor) getServletConfig().getServletContext().getAttribute(org.apache.AnnotationProcessor.class.getName());
  }

  public void _jspDestroy() {
  }

  public void _jspService(HttpServletRequest request, HttpServletResponse response)
        throws java.io.IOException, ServletException {

    PageContext pageContext = null;
    HttpSession session = null;
    ServletContext application = null;
    ServletConfig config = null;
    JspWriter out = null;
    Object page = this;
    JspWriter _jspx_out = null;
    PageContext _jspx_page_context = null;


    try {
      response.setContentType("text/html");
      pageContext = _jspxFactory.getPageContext(this, request, response,
      			null, true, 8192, true);
      _jspx_page_context = pageContext;
      application = pageContext.getServletContext();
      config = pageContext.getServletConfig();
      session = pageContext.getSession();
      out = pageContext.getOut();
      _jspx_out = out;


request.setAttribute("title", "Content Repository Setup");

      org.apache.jasper.runtime.JspRuntimeLibrary.include(request, response, "../header.jsp", out, false);
      out.write("\n");
      out.write("<p>\n");
      out.write("  Your content repository is not properly configured yet. Please use\n");
      out.write("  the forms below to setup the content repository.\n");
      out.write("</p>\n");
      out.write("<p>\n");
      out.write("  Alternatively, you can directly modify the settings in the\n");
      out.write("  <code>WEB-INF/web.xml</code> deployment descriptor and redeploy this\n");
      out.write("  web application.\n");
      out.write("</p>\n");
      out.write("\n");
      out.write("<h3>Create a new content repository</h3>\n");
      out.write("<form action=\"");
      out.print( Text.encodeIllegalXMLCharacters(request.getContextPath()) );
      out.write("/admin\" method=\"POST\">\n");
      out.write("  <input type=\"hidden\" name=\"mode\" value=\"new\"/>\n");
      out.write("  <p>\n");
      out.write("    Use this form to create a new content repository in the given directory.\n");
      out.write("    The directory is created by this web application and should not already\n");
      out.write("    exist. The repository is created using a default configuration file.\n");
      out.write("  </p>\n");
      out.write("  <p>\n");
      out.write("    <label>\n");
      out.write("      Repository home directory:\n");
      out.write("      <input size=\"40\" type=\"text\" name=\"repository_home\" value=\"jackrabbit\">\n");
      out.write("    </label>\n");
      out.write("  </p>\n");
      out.write("  <p><input type=\"submit\" value=\"Create Content Repository\"></p>\n");
      out.write("</form>\n");
      out.write("\n");
      out.write("<h3>Use an existing content repository</h3>\n");
      out.write("<form action=\"");
      out.print( Text.encodeIllegalXMLCharacters(request.getContextPath()) );
      out.write("/admin\" method=\"POST\">\n");
      out.write("  <input type=\"hidden\" name=\"mode\" value=\"existing\"/>\n");
      out.write("  <p>\n");
      out.write("    Use this form to access an existing content repository in the given\n");
      out.write("    directory. The repository configuration file should be available as\n");
      out.write("    <code>repository.xml</code> within the given directory.\n");
      out.write("  </p>\n");
      out.write("  <p>\n");
      out.write("    Note that the repository can not be concurrently accessed by multiple\n");
      out.write("    applications. You must use WebDAV or RMI through this web application\n");
      out.write("    if you want to access the repository remotely. Other web applications\n");
      out.write("    running in the same servlet container can access the repository locally\n");
      out.write("    using JNDI.\n");
      out.write("  </p>\n");
      out.write("  <p>\n");
      out.write("    <label>\n");
      out.write("      Repository home directory:\n");
      out.write("      <input size=\"40\" type=\"text\" name=\"repository_home\" value=\"jackrabbit\">\n");
      out.write("    </label>\n");
      out.write("  </p>\n");
      out.write("  <p><input type=\"submit\" value=\"Access Content Repository\"></p>\n");
      out.write("</form>\n");
      out.write("\n");
      org.apache.jasper.runtime.JspRuntimeLibrary.include(request, response, "../footer.jsp", out, false);
      out.write('\n');
    } catch (Throwable t) {
      if (!(t instanceof SkipPageException)){
        out = _jspx_out;
        if (out != null && out.getBufferSize() != 0)
          try { out.clearBuffer(); } catch (java.io.IOException e) {}
        if (_jspx_page_context != null) _jspx_page_context.handlePageException(t);
      }
    } finally {
      _jspxFactory.releasePageContext(_jspx_page_context);
    }
  }
}
